﻿using XYS.Service.Core.EventBus.Events;

namespace XYS.Service.Core.EventBus.Abstractions
{
    /// <summary>
    /// 集成事件处理器接口
    /// </summary>
    /// <typeparam name="TIntegrationEvent">TIntegrationEvent泛型</typeparam>
    public interface IIntegrationEventHandler<in TIntegrationEvent> : IIntegrationEventHandler
       where TIntegrationEvent : IntegrationEvent
    {
        /// <summary>
        /// 处理
        /// </summary>
        /// <param name="event"></param>
        /// <returns></returns>
        Task Handle(TIntegrationEvent @event);
    }

    /// <summary>
    /// 集成事件处理器
    /// </summary>
    public interface IIntegrationEventHandler { }
}
